<?
	require_once('../inc/BillingAddresses.php');
	$id = intval($_REQUEST["id"]);
	$gu = GetBAddress($id);	
	while($row = mysql_fetch_assoc($gu))
	{
		$id = $row['id'];
		$ui = $row['Users_id'];
		$sa = $row['street_address'];
		$c = $row['city'];
		$s = $row['state'];
		$zc = $row['zip_code'];
	};
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Edit Billing Address</title>
    <link rel="stylesheet" type="text/css" href="../inc/bootstrap.css">
</head>

<body>
        <? include('../inc/header.php'); ?>
        <div class="container">
			<h2>Edit Billing Address</h2>
                        <? include('../inc/nav.php'); ?>
            <div id="contents">               
                <form class="form-horizontal" method="post" action="beditBillingAddress.php">
                        <input type="hidden" name="id" value="<?=$id ?>" />
                    <div class=" control-group">
                        <label class="control-label" for="userid">User id:</label>
                        <div class="controls">
                            <input type="text" name="userid" id="userid" value="<?=$ui ?>" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="streetaddress">Street Address:</label>
                        <div class="controls">
                            <input type="text" name="streetaddress" id="streetaddress" value="<?=$sa ?>" />
                        </div>
                    </div>
					<div class="control-group">
                        <label class="control-label" for="city">City:</label>
                        <div class="controls">
                            <input type="text" name="city" id="city" value="<?=$c ?>" />
                        </div>
                    </div>
					<div class="control-group">
                        <label class="control-label" for="state">State:</label>
                        <div class="controls">
                            <input type="text" name="state" id="state" value="<?=$s ?>" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="zipcode">Zip Code:</label>
                        <div class="controls">
                            <input type="text" name="zipcode" id="zipcode" value="<?=$zc ?>" />
                        </div>
                    </div>
                    <input class="btn btn-primary" type="submit" value="Save" />
                </form>
           </div>
       </div>
</body>
</html>